<link rel="stylesheet" href="../scripts/uniform/css/uniform.default.css" media="screen" />
<script src="../scripts/uniform/jquery.uniform.js"></script>
<script type="text/javascript">
    $(document).ready(function()
    {
        $("select").uniform();
    });
</script>
<?php
    function __autoload($class_name)
	{
		include_once('../classes/'.strtolower($class_name).'.php');
	}
    
    $MaLoaiSanPhamCap1 = 0;
    
    if(isset($_POST['MaLoaiSanPhamCap1']))
        $MaLoaiSanPhamCap1 = $_POST['MaLoaiSanPhamCap1'];
    
    $loaisanphamc2 = new loaisanphamc2bs();
    $loaisanphamc2->MaLoaiSanPhamCap1 = $MaLoaiSanPhamCap1;
    $ret_loaisanphamc2 = $loaisanphamc2->getList();
    if($ret_loaisanphamc2 != null)
    {
        echo '<label>Chọn loại sản phẩm cấp 2 <span class="require">*</span></label>
            <select name="MaLoaiSanPhamCap2" id="MaLoaiSanPhamCap2" onchange="getStyleProductThi();">';
            echo "<option value='0'>---- Chọn ----</option>";
    			for($i = 0; $i < ($ret_loaisanphamc2 != false ? count($ret_loaisanphamc2) : 0); $i++)
    			{
    				echo "<option value=\"{$ret_loaisanphamc2[$i]['MaLoaiSanPhamCap2']}\">{$ret_loaisanphamc2[$i]['TenLoaiSanPhamCap2']}</option>";
    			}
    	echo '</select>';
    }
?>